package com.bkhc.product.entity;


import com.bkhc.common.listener.DataEntityListener;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;
import java.util.List;
/**
 * 一個產品的實際產品實例的規格
 */
@Entity
@Data
@Table(name = "tbl_goods_spec")
@EntityListeners({AuditingEntityListener.class, DataEntityListener.class})
public class GoodsSpec {
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Id
    private int id ;

    @Column(name = "spec_code")
    private String specCode;

    @Column(name = "spec_name")
    private String specName;

    @Column(name = "spec_value")
    private String specValue;

    @Column(name = "goods_code")
    private String goodsCode;

    @Column(name = "creator",updatable = false)
    private String creator;

    @Column(name = "create_date",updatable = false)
    @CreatedDate
    private Date createDate;

    @Column(name = "updator")
    private String updator;

    @LastModifiedDate
    @Column(name = "update_date")
    private Date updateDate;

}
